package com.tc.shiro.repository;

import com.tc.shiro.entity.PortalRolePermissionRel;
import com.tc.shiro.model.PermissionModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PortalRolePermissionRelRepository {

	int deleteByPrimaryKey(Long id);

	PortalRolePermissionRel selectByPrimaryKey(Long id);

	int updateByPrimaryKey(PortalRolePermissionRel portalRolePermissionRel);

	int updateByPrimaryKeySelective(PortalRolePermissionRel portalRolePermissionRel);

	int insert(PortalRolePermissionRel portalRolePermissionRel);

	int insertSelective(PortalRolePermissionRel portalRolePermissionRel);

	int selectCount(PortalRolePermissionRel portalRolePermissionRel);

	List<PortalRolePermissionRel> selectPage( @Param("portalRolePermissionRel") PortalRolePermissionRel portalRolePermissionRel,@Param("pageable") Pageable pageable);

	List<PortalRolePermissionRel> selectByRoleNo(PortalRolePermissionRel portalRolePermissionRel);

	PortalRolePermissionRel selectByMenuId(PortalRolePermissionRel portalRolePermissionRel);

	int batchInsertSelective(@Param("list") List<PortalRolePermissionRel> portalRolePermissionRelList);

	int deleteByRoleNo(String roleNo);

	int selectCountByRoleNo(String roleNo);

	List<PermissionModel> queryPermissionByRoleNo(@Param("roleNo") String roleNo);

	List<PermissionModel> queryPermByRoleNoWithUnsupportMenu(@Param("roleNo") String roleNo, @Param("unsupportList") List<String> unsupportList);

}